package userConsole.servlet;

import org.json.JSONObject;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * @author Godv
 * @version 1.0
 */
public class StaticPrint {
    public static void print(HttpServletResponse response, JSONObject jsonObject) {
        response.setContentType("application/json;charset=utf-8");
        PrintWriter writer = null;
        try {
            writer = response.getWriter();
        } catch (IOException e) {
            e.printStackTrace();
        }
        writer.print(jsonObject);
    }
}
